<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>RD.Renderer</title>
    <link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
    <link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
    <link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
    <link rel="icon" href="../assets/favicon.ico">
    <script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">

<div id="doc">
    <div id="hd" class="yui3-g header">
        <div class="yui3-u-3-4">
                <h1><img src="../assets/css/logo.png" title="" width="117" height="52"></h1>
        </div>
        <div class="yui3-u-1-4 version">
            <em>API Docs for: </em>
        </div>
    </div>
    <div id="bd" class="yui3-g">

        <div class="yui3-u-1-4">
            <div id="docs-sidebar" class="sidebar apidocs">
                <div id="api-list">
                    <h2 class="off-left">APIs</h2>
                    <div id="api-tabview" class="tabview">
                        <ul class="tabs">
                            <li><a href="#api-classes">Classes</a></li>
                            <li><a href="#api-modules">Modules</a></li>
                        </ul>
                
                        <div id="api-tabview-filter">
                            <input type="search" id="api-filter" placeholder="Type to filter APIs">
                        </div>
                
                        <div id="api-tabview-panel">
                            <ul id="api-classes" class="apis classes">
                                <li><a href="../classes/RD...html">RD..</a></li>
                                <li><a href="../classes/RD.Billboard.html">RD.Billboard</a></li>
                                <li><a href="../classes/RD.Camera.html">RD.Camera</a></li>
                                <li><a href="../classes/RD.ParticlesEmissor.html">RD.ParticlesEmissor</a></li>
                                <li><a href="../classes/RD.PointCloud.html">RD.PointCloud</a></li>
                                <li><a href="../classes/RD.Renderer.html">RD.Renderer</a></li>
                                <li><a href="../classes/RD.Scene.html">RD.Scene</a></li>
                                <li><a href="../classes/RD.SceneNode.html">RD.SceneNode</a></li>
                                <li><a href="../classes/RD.Sprite.html">RD.Sprite</a></li>
                            </ul>
                
                
                            <ul id="api-modules" class="apis modules">
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="yui3-u-3-4">
                <div id="api-options">
                    Show:
                    <label for="api-show-inherited">
                        <input type="checkbox" id="api-show-inherited" checked>
                        Inherited
                    </label>
            
                    <label for="api-show-protected">
                        <input type="checkbox" id="api-show-protected">
                        Protected
                    </label>
            
                    <label for="api-show-private">
                        <input type="checkbox" id="api-show-private">
                        Private
                    </label>
                    <label for="api-show-deprecated">
                        <input type="checkbox" id="api-show-deprecated">
                        Deprecated
                    </label>
            
                </div>
            
            <div class="apidocs">
                <div id="docs-main">
                    <div class="content">
<h1>RD.Renderer Class</h1>
<div class="box meta">


        <div class="foundat">
            Defined in: <a href="../files/.._src_rendeer.js.html#l1638"><code>..&#x2F;src&#x2F;rendeer.js:1638</code></a>
        </div>


</div>


<div class="box intro">
    <p>Renderer in charge of rendering a Scene
Valid options: all LiteGL context creation options (canvas, WebGL Flags, etc), plus: assets_folder, autoload_assets, shaders_file</p>

</div>

    <div class="constructor">
        <h2>Constructor</h2>
<div id="method_RD.Renderer" class="method item">
    <h3 class="name"><code>RD.Renderer</code></h3>

        <span class="paren">()</span>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l1638"><code>..&#x2F;src&#x2F;rendeer.js:1638</code></a>
        </p>



    </div>

    <div class="description">
        
    </div>




</div>
    </div>

<div id="classdocs" class="tabview">
    <ul class="api-class-tabs">
        <li class="api-class-tab index"><a href="#index">Index</a></li>

            <li class="api-class-tab methods"><a href="#methods">Methods</a></li>
            <li class="api-class-tab properties"><a href="#properties">Properties</a></li>
    </ul>

    <div>
        <div id="index" class="api-class-tabpanel index">
            <h2 class="off-left">Item Index</h2>

                <div class="index-section methods">
                    <h3>Methods</h3>

                    <ul class="index-list methods">
                            <li class="index-item method">
                                <a href="#method_clear">clear</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_loadMesh">loadMesh</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_loadShaders">loadShaders</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_loadTexture">loadTexture</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_render">render</a>

                            </li>
                            <li class="index-item method">
                                <a href="#method_setDataFolder">setDataFolder</a>

                            </li>
                    </ul>
                </div>

                <div class="index-section properties">
                    <h3>Properties</h3>

                    <ul class="index-list properties">
                            <li class="index-item property">
                                <a href="#property_meshes">meshes</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_shaders">shaders</a>

                            </li>
                            <li class="index-item property">
                                <a href="#property_textures">textures</a>

                            </li>
                    </ul>
                </div>


        </div>

            <div id="methods" class="api-class-tabpanel">
                <h2 class="off-left">Methods</h2>

<div id="method_clear" class="method item">
    <h3 class="name"><code>clear</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>color</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l1727"><code>..&#x2F;src&#x2F;rendeer.js:1727</code></a>
        </p>



    </div>

    <div class="description">
        <p>clear color and depth buffer</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">color</code>
                        <span class="type">Vec4</span>


                    <div class="param-description">
                        <p>clear color</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_loadMesh" class="method item">
    <h3 class="name"><code>loadMesh</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>on_complete</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2023"><code>..&#x2F;src&#x2F;rendeer.js:2023</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads one mesh and stores inside the meshes object to be reused in the future, if it is already loaded it skips the loading</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name (and url) of the mesh</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">on_complete</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                        <p>callback</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_loadShaders" class="method item">
    <h3 class="name"><code>loadShaders</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>url</code>
                </li>
                <li class="arg">
                        <code>on_complete</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2180"><code>..&#x2F;src&#x2F;rendeer.js:2180</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads a shaders file in the Atlas file format (check GL.loadFileAtlas in litegl)</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">url</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>url to text file containing all the shader files</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">on_complete</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                        <p>callback</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_loadTexture" class="method item">
    <h3 class="name"><code>loadTexture</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>name</code>
                </li>
                <li class="arg">
                        <code>options</code>
                </li>
                <li class="arg">
                        <code>on_complete</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2085"><code>..&#x2F;src&#x2F;rendeer.js:2085</code></a>
        </p>



    </div>

    <div class="description">
        <p>Loads one texture and stores inside the textures object to be reused in the future, if it is already loaded it skips the loading</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">name</code>
                        <span class="type">String</span>


                    <div class="param-description">
                        <p>name (and url) of the texture</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">options</code>
                        <span class="type">Object</span>


                    <div class="param-description">
                        <p>texture options as in litegl (<a href="http://option.name">option.name</a> is used to store it with a different name)</p>

                    </div>

                </li>
                <li class="param">
                        <code class="param-name">on_complete</code>
                        <span class="type">Function</span>


                    <div class="param-description">
                        <p>callback</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_render" class="method item">
    <h3 class="name"><code>render</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>scene</code>
                </li>
                <li class="arg">
                        <code>camera</code>
                </li>
                <li class="arg">
                        <code>nodes</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l1759"><code>..&#x2F;src&#x2F;rendeer.js:1759</code></a>
        </p>



    </div>

    <div class="description">
        <p>renders once scene from one camera</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">scene</code>
                        <span class="type"><a href="../classes/RD.Scene.html" class="crosslink">RD.Scene</a></span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">camera</code>
                        <span class="type"><a href="../classes/RD.Camera.html" class="crosslink">RD.Camera</a></span>


                    <div class="param-description">
                         
                    </div>

                </li>
                <li class="param">
                        <code class="param-name">nodes</code>
                        <span class="type">Array</span>


                    <div class="param-description">
                        <p>[Optional] array with nodes to render, otherwise all nodes will be rendered</p>

                    </div>

                </li>
            </ul>
        </div>



</div>
<div id="method_setDataFolder" class="method item">
    <h3 class="name"><code>setDataFolder</code></h3>

        <div class="args">
            <span class="paren">(</span><ul class="args-list inline commas">
                <li class="arg">
                        <code>path</code>
                </li>
            </ul><span class="paren">)</span>
        </div>








    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l1708"><code>..&#x2F;src&#x2F;rendeer.js:1708</code></a>
        </p>



    </div>

    <div class="description">
        <p>whats the data folder where all data should be fetch</p>

    </div>

        <div class="params">
            <h4>Parameters:</h4>

            <ul class="params-list">
                <li class="param">
                        <code class="param-name">path</code>
                        <span class="type">String</span>


                    <div class="param-description">
                         
                    </div>

                </li>
            </ul>
        </div>



</div>
            </div>

            <div id="properties" class="api-class-tabpanel">
                <h2 class="off-left">Properties</h2>

<div id="property_meshes" class="property item">
    <h3 class="name"><code>meshes</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2384"><code>..&#x2F;src&#x2F;rendeer.js:2384</code></a>
        </p>


    </div>

    <div class="description">
        <p>container with all the registered meshes (same as gl.meshes)</p>

    </div>



</div>
<div id="property_shaders" class="property item">
    <h3 class="name"><code>shaders</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2404"><code>..&#x2F;src&#x2F;rendeer.js:2404</code></a>
        </p>


    </div>

    <div class="description">
        <p>container with all the registered shaders (same as gl.shaders)</p>

    </div>



</div>
<div id="property_textures" class="property item">
    <h3 class="name"><code>textures</code></h3>
    <span class="type">Object</span>





    <div class="meta">
                <p>
                Defined in
        <a href="../files/.._src_rendeer.js.html#l2394"><code>..&#x2F;src&#x2F;rendeer.js:2394</code></a>
        </p>


    </div>

    <div class="description">
        <p>container with all the registered textures (same as gl.textures)</p>

    </div>



</div>
            </div>


    </div>
</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>
